<?php 

/**
* 控制基类
*/
class Controller extends Smarty
{
    public function __construct()
    {
       //配置samrty  对象链方式
      $this->setTemplateDir('./views')
             ->setCompileDir('./runtime/views_c')
             ->setConfigDir('./configs')
             ->setCacheDir('./runtime/caches');

      // 配置 模版变量定界符  <{  }>
      $this->left_delimiter = "<{";
      $this->right_delimiter = "}>";

      // 配置缓存
      $this->caching = false;//开启缓存
      $this->cache_lifetime = 30;//缓存 +30s
    }

    
    public  function __call($fun, $params)
    {
          echo "<h1>404 NOT FOUND</h1> 方法不存在";
          exit();
    }
    
}

